
<template>
  <div class="grade3 base-background-img">
    <ul class="ul-item-content">
      <li class="li-item-content" v-for='(item, index) in tabs' :key="index" :class="{'active': item.isSelected}" @click="swiper(item)">
        <img style="width:260px;height:51px;" :src="item.img" alt="">
      </li>
    </ul>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  import STATICPATH from '../../config.js'
  export default {
    name: 'grade3',
    data () {
      return {
        isshowpdf: false,
        ishsowvideo: false,
        info: '',
        infourl: '',
        tabs: [{
          img: 'static/robot/3/1.png',
          url: 'static/robot/pdf/3/【课程讲义】——音乐盒.pdf',
          data: [{
            isSelected: 1,
            name: '音乐盒—《小孩小孩会唱歌》',
            url: STATICPATH + '/robot/3/纸粘土/xiaohaixiaohaihuichangge.mp4'
          }]
        },
        {
          img: 'static/robot/3/2.png',
          url: 'static/robot/pdf/3/【课程讲义】——魔法森林.pdf',
          data: [{
            isSelected: 1,
            name: '魔法森林—《我有一双小小手》',
            url: STATICPATH + '/robot/3/纸粘土/woyouyishuangxiaoxiaoshou.mp4'
          }]
        },
        {
          img: 'static/robot/3/3.png',
          url: 'static/robot/pdf/3/【课程讲义】——城堡.pdf',
          data: [{
            isSelected: 1,
            name: '城堡—《咚咚和嗵嗵》',
            url: STATICPATH + '/robot/3/太空沙/dongdonghetongtong.mp4'
          }]
        },
        {
          img: 'static/robot/3/4.png',
          url: 'static/robot/pdf/3/【课程讲义】——海底世界.pdf',
          data: [{
            isSelected: 1,
            name: '海底世界—《悄悄话》',
            url: STATICPATH + '/robot/3/太空沙/qiaoqiaohua.mp4'
          }]
        },
        {
          img: 'static/robot/3/5.png',
          url: 'static/robot/pdf/3/【课程讲义】——陀螺.pdf',
          data: []
        },
        {
          img: 'static/robot/3/6.png',
          url: 'static/robot/pdf/3/【课程讲义】——声控车.pdf',
          data: []
        },
        {
          img: 'static/robot/3/7.png',
          url: 'static/robot/pdf/3/【课程讲义】——吹风机.pdf',
          data: [{
            isSelected: 1,
            name: '吹风机—《大风吹》',
            url: STATICPATH + '/robot/3/大颗粒/dafengchui.mp4'
          }]
        },
        {
          img: 'static/robot/3/8.png',
          url: 'static/robot/pdf/3/【课程讲义】——跳舞的小人.pdf',
          data: [{
            isSelected: 1,
            name: '跳舞的小人—《一起跳舞吧》',
            url: STATICPATH + '/robot/3/大颗粒/yiqitiaowuba.mp4'
          }]
        },
        {
          img: 'static/robot/3/9.png',
          url: 'static/robot/pdf/3/【课程讲义】——星光投射灯.pdf',
          data: [{
            isSelected: 1,
            name: '星光投射灯—《抢凳子》',
            url: STATICPATH + '/robot/3/纸卡/qiangdengzi.mp4'
          }]
        },
        {
          img: 'static/robot/3/10.png',
          url: 'static/robot/pdf/3/【课程讲义】——太阳系.pdf',
          data: [{
            isSelected: 1,
            name: '太阳系',
            url: STATICPATH + '/robot/3/纸卡/taiyangxi.mp4'
          }]
        },
        {
          img: 'static/robot/3/11.png',
          url: 'static/robot/pdf/3/【课程讲义】——小小发明家1.pdf',
          data: [{
            isSelected: 1,
            name: '小小发明家（1）—《做饭饭》',
            url: STATICPATH + '/robot/3/大颗粒/zuofanfan.mp3'
          }]
        },
        {
          img: 'static/robot/3/12.png',
          url: 'static/robot/pdf/3/【课程讲义】——小小发明家2.pdf',
          data: [{
            isSelected: 1,
            name: '小小发明家（2）——小动物',
            url: STATICPATH + '/robot/3/纸粘土/xiaodongwu.mp4'
          }]
        }]
      }
    },
    methods: {
      swiper: function (item) {
        console.log(item)
        this.info = item.data
        this.pdfurl = item.url
        this.isshowpdf = true
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.grade3 > div {
  position: absolute; 
}
.ul-item-content {
  margin: 0;
  padding: 0;
  list-style-type: none;
  z-index: 10;
  top: 230px;
  left: 190px;
  width: 910px;
  height: 480px;
  position: absolute;
}
.li-item-content {
  cursor: pointer;
  float: left;
  margin: 15px 20px;
  position: initial;
}
</style>
